﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="CTHS.aspx.cs" Inherits="webtracuudiem.CTHS" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <style type="text/css">

        .auto-style2 {
            font-size: x-large;
            color: #FF3300;
            text-align: center;
            background-color: #FF9933;
        }

        .auto-style25 {
            width: 163px;
        }
    
        .auto-style24 {
            width: 167px;
        }

        .auto-style1 {
            width: 100%;
        }

        .auto-style26 {
            width: 163px;
            height: 20px;
        }
        .auto-style27 {
            width: 167px;
            height: 20px;
        }
        .auto-style28 {
            width: 162px;
            height: 20px;
        }
        .auto-style29 {
            height: 20px;
        }
        .auto-style30 {
            width: 219px;
            color: #0033CC;
            background-color: #FF9933;
            height: 20px;
        }
        .auto-style35 {
            font-size: 11pt;
        }
        .auto-style36 {
            font-size: 11pt;
            width: 219px;
        }
        .auto-style37 {
            width: 219px;
        }
        .auto-style38 {
            width: 219px;
            height: 20px;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <table class="auto-style1">
        <tr>
            <td class="auto-style2" colspan="3"><strong >CÔNG TÁC HỌC SINH</strong></td>
            <td>
                <asp:Button ID="ButThoat" runat="server" Text="Đăng xuất" Width="97px" OnClick="ButThoat_Click" />
            </td>
        </tr>
        <tr>
            <td class="auto-style19" colspan="4">&nbsp;</td>
        </tr>
        <tr>
            <td class="auto-style36">Chọn Ngành</td>
            <td class="auto-style35" >Chọn Lớp</td>
            
            <td class="auto-style25">&nbsp;</td>
        </tr>
        <tr>
            <td class="auto-style37">
                <asp:DropDownList ID="DropDownList1" runat="server" DataSourceID="CHonnganhSourceCTHS" DataTextField="TenNganh" DataValueField="MaNganh" AutoPostBack="True">
                </asp:DropDownList>
                <asp:SqlDataSource ID="CHonnganhSourceCTHS" runat="server" ConnectionString="<%$ ConnectionStrings:Demo1ConnectionString2 %>" SelectCommand="SELECT * FROM [NganhHoc]"></asp:SqlDataSource>
            </td>
            <td class="auto-style24">
                <asp:DropDownList ID="DropDownList2" runat="server" DataSourceID="ChonlopSourceCTHS" DataTextField="MaLop" DataValueField="MaLop">
                </asp:DropDownList>
                <asp:SqlDataSource ID="ChonlopSourceCTHS" runat="server" ConnectionString="<%$ ConnectionStrings:Demo1ConnectionString %>" SelectCommand="SELECT * FROM [Lop] WHERE ([MaNganh] = @MaNganh)">
                    <SelectParameters>
                        <asp:ControlParameter ControlID="DropDownList1" Name="MaNganh" PropertyName="SelectedValue" Type="String" />
                    </SelectParameters>
                </asp:SqlDataSource>
            </td>
            <td class="auto-style25">&nbsp;</td>
            <td>&nbsp;</td>
        </tr>
        <tr>
            <td class="auto-style37">&nbsp;</td>
            <td class="auto-style24">&nbsp;</td>
            <td class="auto-style25">&nbsp;</td>
            <td>&nbsp;</td>
        </tr>
        <tr>
            <td class="auto-style30">Điều kiện lọc</td>
            <td class="auto-style24">
                <asp:Button ID="ButLocHSKhaGioi" runat="server" Text="Lọc DSHS Khá, Giỏi" Width="157px" OnClick="ButLocHSKhaGioi_Click" />
            </td>
            <td class="auto-style25">&nbsp;</td>
            <td>&nbsp;</td>
        </tr>
        <tr>
            <td colspan="4">
                <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataKeyNames="MaSV" DataSourceID="SqlDataSource1" Width="406px">
                    <Columns>
                        <asp:BoundField HeaderText="Mã sinh viên" DataField="MaSV" ReadOnly="True" SortExpression="MaSV" />
                        <asp:BoundField HeaderText="Họ lót" DataField="holot" SortExpression="holot" />
                        <asp:BoundField HeaderText="Tên" DataField="ten" SortExpression="ten" />
                         <asp:BoundField HeaderText="Điểm Trung Bình" DataField="DTB" SortExpression="DTB" ReadOnly="True" />
                       
                    </Columns>
                </asp:GridView>
            </td>
        </tr>
        <tr>
            <td class="auto-style37">
                <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:Demo1ConnectionString %>" SelectCommand="select SinhVien.MaSV,holot,ten,round(AVG(diemkq),1) as 'DTB'
from Diem,SinhVien
where Diem.MaSV=SinhVien.MaSV and MaLop=@malop
group by SinhVien.MaSV,holot,ten
having round(AVG(diemkq),1)&gt;=7">
                    <SelectParameters>
                        <asp:ControlParameter ControlID="DropDownList2" Name="malop" PropertyName="SelectedValue" />
                    </SelectParameters>
                </asp:SqlDataSource>
            </td>
            <td class="auto-style24">&nbsp;</td>
            <td class="auto-style25">&nbsp;</td>
            <td>&nbsp;</td>
        </tr>
        <tr>
            <td class="auto-style38"></td>
            <td class="auto-style27"></td>
            <td class="auto-style26"></td>
            <td class="auto-style29"></td>
        </tr>
        <tr>
            <td class="auto-style38">&nbsp;</td>
            <td class="auto-style27">&nbsp;</td>
            <td class="auto-style26">&nbsp;</td>
            <td class="auto-style29">&nbsp;</td>
        </tr>
        <tr>
            <td class="auto-style38"></td>
            <td class="auto-style27"></td>
            <td class="auto-style26"></td>
            <td class="auto-style29"></td>
        </tr>
        <tr>
            <td class="auto-style38">&nbsp;</td>
            <td class="auto-style27">&nbsp;</td>
            <td class="auto-style26">&nbsp;</td>
            <td class="auto-style29">&nbsp;</td>
        </tr>
        <tr>
            
            <td class="auto-style38">
            </td>
            <td class="auto-style28"></td>
            <td class="auto-style26"></td>
        </tr>
        <tr>
            <td class="auto-style37">&nbsp;</td>
            <td class="auto-style24">&nbsp;</td>
            <td class="auto-style25">&nbsp;</td>
            <td>&nbsp;</td>
        </tr>
    </table>
</asp:Content>
